package cn.xcyy.itcc.feign;

import cn.xcyy.itcc.doc.CourseDoc;
import cn.xcyy.itcc.fallback.CourseEsFallbackFactory;
import cn.xcyy.itcc.result.JSONResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(value = "service-search", fallbackFactory = CourseEsFallbackFactory.class)
public interface CourseEsFeignClien {

    /*
     * 课程新增ES接口
     **/
    @PostMapping("/search/courseEsAdd")
    JSONResult courseEsAdd(@RequestBody CourseDoc courseDoc);

    @PostMapping("/search/courseEsAdd")
    JSONResult searchMediaFiles(List<Long> courseChapterIds);
}